import 'package:bilibili/pages/login/login_bottom.dart';
import 'package:bilibili/pages/login/login_header.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bilibili/core/extension/int_extension.dart';

class LoginContent extends StatefulWidget {
  const LoginContent({Key? key}) : super(key: key);

  @override
  _LoginContentState createState() => _LoginContentState();
}

class _LoginContentState extends State<LoginContent> {
  FocusNode focusNode = FocusNode();
  int imageNum = 1;
  String account = "";
  String password = "";
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    focusNode.addListener(() {
      if(focusNode.hasFocus) setState(() {imageNum = 2;});
      else setState(() {imageNum = 1;});
    });

  }
  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
    focusNode.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        LoginHeader(context, imageNum, focusNode, (value) {}, (value) {}).buildLoginHeader(),
        SizedBox(height: 50.px,),
        LoginBottom(context, account, password).buildLoginBottom(),
      ],
    );
  }


}
